load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

package(default_visibility = ["//:__subpackages__"])  # keep

licenses(["notice"])  # keep

go_library(
    name = "keyderivation",
    srcs = [
        "keyderivation.go",
        "keyderivation_key_templates.go",
        "keyset_deriver.go",
        "keyset_deriver_factory.go",
        "prf_based_deriver.go",
        "prf_based_deriver_key_manager.go",
    ],
    importpath = "github.com/google/tink/go/keyderivation",
    visibility = ["//visibility:public"],
    deps = [
        "//core/primitiveset",
        "//core/registry",
        "//insecurecleartextkeyset",
        "//internal",
        "//internal/internalregistry",
        "//keyderivation/internal/streamingprf",
        "//keyset",
        "//proto/prf_based_deriver_go_proto",
        "//proto/tink_go_proto",
        "@org_golang_google_protobuf//proto",
    ],
)

go_test(
    name = "keyderivation_test",
    srcs = [
        "keyderivation_key_templates_test.go",
        "keyderivation_test.go",
        "keyset_deriver_factory_test.go",
        "keyset_deriver_factory_x_test.go",
        "prf_based_deriver_key_manager_test.go",
        "prf_based_deriver_test.go",
    ],
    embed = [":keyderivation"],
    deps = [
        "//aead",
        "//core/cryptofmt",
        "//core/primitiveset",
        "//core/registry",
        "//daead",
        "//insecurecleartextkeyset",
        "//keyset",
        "//mac",
        "//prf",
        "//proto/aes_gcm_go_proto",
        "//proto/common_go_proto",
        "//proto/hkdf_prf_go_proto",
        "//proto/prf_based_deriver_go_proto",
        "//proto/tink_go_proto",
        "//signature",
        "//streamingaead",
        "//subtle/random",
        "@com_github_google_go_cmp//cmp",
        "@org_golang_google_protobuf//proto",
        "@org_golang_google_protobuf//testing/protocmp",
    ],
)

alias(
    name = "go_default_library",
    actual = ":keyderivation",
    visibility = ["//visibility:public"],
)
